package com.cv.system.controller.system.logger.vo;

import com.cv.framework.common.pojo.PageResult;
import com.cv.framework.common.pojo.Result;
import com.cv.framework.operatelog.core.annotations.OperateLog;
import com.cv.system.controller.system.logger.vo.loginLog.SystemLoginLogPageReqVO;
import com.cv.system.controller.system.logger.vo.loginLog.SystemLoginLogRespVO;
import com.cv.system.service.logger.SystemLoginLogService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 后台管理系统 - 登录日志
 *
 * @author Charles_XDXD
 */
@Tag(name = "后台管理系统 - 登录日志")
@RestController
@RequestMapping("/system/login-log")
public class SystemLoginLogController {

    @Resource
    private SystemLoginLogService systemLoginLogService;

    @PostMapping("/page")
    @OperateLog(enable = false)
    @Operation(summary = "系统登录日志分页数据")
    public Result<PageResult<SystemLoginLogRespVO>> getSystemLoginLogPage(@RequestBody SystemLoginLogPageReqVO reqVO) {
        return Result.success(systemLoginLogService.getSystemLoginLogPage(reqVO));
    }

}
